DR1='N:'
DR2='Q:'
F1='DOCTORS'
F2='DOCT_FE2'
SELE 1
SET EXCLU OFF
USE &DR1&F1
SELE 2
SET EXCLU OFF
USE &DR2&F2 INDEX &DR2&F2
GO TOP
MON=CMONTH(DATE_VISIT)
CLOS DATA
CLOS INDEX
store 0 to pl1,pl2,pl3,TOTFEE,TOTGROSS,TOTAX,TOTGROSSI,TOTAXI,totnet,totneti,PAG,fl,hl,ttl,ttl1
do while pl1=0
   @ 12,60 say '/'
   @ 12,54 prompt 'Print'
   @ 12,62 prompt 'Quit'
   menu to pl1
   if pl1=2
      RETN=.T.
      return
   else
      @ 14,60 say '/'
      @ 14,46 prompt 'Printer Ready'
      @ 14,62 prompt 'Not Yet Ready'
      menu to pl2
      if pl2=2
         @ 14,46 clea to 14,78
         pl1=0
      else
         @ 16,46 say '        Printing...    '
         set console off
         set devi to prin
      endif
   endif
enddo
tanggal=date()
DOCCOD=SPACE(3)
DOCNAM=SPACE(12)
br=100
set devi to print
@ 0,0 say chr(15) pict 'x'
SELE 1
SET EXCLU OFF
USE &DR1&F1
IF DALL='Y'
   GO TOP
ELSE
   LOCA FOR DOC_ALIAS=DNAME
ENDIF
DO WHILE  .NOT. EOF()
   DOCCOD=DOC_CODE
   DOCNAM=DOC_ALIAS
   DOCW=LEN(TRIM(DOCNAM))
   totgrossi=0
   totaxi=0
   totneti=0
   pract=practice_1
   ttl=0
   ttl1=0
   PROC=0
   SELE 2
   USE &DR2&F2 INDEX &DR2&F2
   SEEK DOCCOD
   IF EOF()
      stor .f. to T&doccod
      SELE 1
      SKIP
      LOOP
   ELSE
      stor .t. to T&doccod
      do rdocpro
   endif
   sele 1
   TTL=0
   TTL1=0
   skip
enddo
SET DEVI TO SCREEN
CLOSE DATA
CLOSE INDEX
RETURN